﻿@using SCMS.Resources
@model SCMS.UI.Models.ViewAssetInventoty
<div class="partialViewCard" style="min-width: 600px;">
    <div class="partialViewCardHeader">
        <h3>
            @Resources_frank.Global_String_AssetName: &nbsp; @Model.EntityAsset.Item.Name</h3>
    </div>
    <br />
    <table width="98%" align="center" cellpadding="0" cellspacing="0" border="0" id="table"
        class="tinytable" style="margin-left: auto; margin-right: auto;">
        <tr>
            <th>
                @Resources_frank.Global_String_Image
            </th>
            <th colspan="2">
                @Resources_frank.Inventory_AssetInventoryPopup_TechnicalDetails
            </th>
        </tr>
        <tr>
            <td align="left" valign="top" rowspan="5" style="width: 38%;">
                <img width="160" height="160" src = "@Url.Action("GetImage", "Inventory")" alt="@Resources_frank.Global_String_NoImage" />
            </td>
            <td align="left" style="width: 30%; font-weight: bold;">
                @Resources_morgan.Global_String_SerialNo:
            </td>
            <td align="left" style="width: 30%;">
                @Model.EntityAsset.SerialNumber
            </td>
        </tr>
        <tr>
            <td align="left" style=" font-weight: bold;">
                @Resources_morgan.Global_String_AssetNo:
            </td>
            <td align="left">
                @Model.EntityAsset.AssetNumber
            </td>
        </tr>
        <tr>
            <td align="left" style=" font-weight: bold;">
                @Resources_frank.Global_String_WeightInKg:
            </td>
            <td align="left">
                @Model.EntityAsset.Weight
            </td>
        </tr>
        <tr>
            <td align="left" style=" font-weight: bold;">
                @Resources_frank.Global_String_Lifespan:
            </td>
            <td align="left">
                @Model.EntityAsset.Lifespan
            </td>
        </tr>
        <tr>
            <td align="left" style=" font-weight: bold;">
                @Resources_frank.GoodsReceivedNote_GRAssetList_SalvageValue (@Model.EntityAsset.Currency.ShortName):
            </td>
            <td align="left">
                @Model.EntityAsset.SalvageValue.ToString("#,##0.00")
            </td>
        </tr>
        <tr>
            <th>
                @Resources_frank.Global_String_Description
            </th>
            <td align="left" style=" font-weight: bold;">
                @Resources_frank.Inventory_AssetInventoryPopup_DeprInMonths:
            </td>
            <td align="left">
                @Model.EntityAsset.DepreciationPeriods
            </td>
        </tr>
        <tr>
            <td align="left" style="width: 38%;" valign="top" rowspan="4">
                @Model.EntityAsset.Name
            </td>
            <td align="left" style=" font-weight: bold;">
                @Resources_frank.Budget_CategoryList_ProjectNo:
            </td>
            <td align="left" title="@Model.EntityAsset.ProjectDonor.Project.Name">
                @Model.EntityAsset.ProjectDonor.ProjectNumber
            </td>
        </tr>
        <tr>
            <td align="left" style=" font-weight: bold;">
                @Resources_morgan.Global_String_Warehouse:
            </td>
            <td align="left">
                @Model.EntityAsset.WareHouse.Name
            </td>
        </tr>
        <tr>
            <td align="left" style=" font-weight: bold;">
                @Resources_frank.Inventory_AssetInventoryPopup_AssignedTo:
            </td>
            <td align="left">
                @if (Model.EntityAsset.Staff != null)
                { @Model.EntityAsset.Staff.Person.FirstName}
                &nbsp;
                @if (Model.EntityAsset.Staff != null)
                { @Model.EntityAsset.Staff.Person.OtherNames}
            </td>
        </tr>
    </table>
    <br />
</div>
<br />
@Ajax.ActionLink(Resources_frank.Global_String_Edit, "LoadEditAsset", new { @assetId = @Model.EntityAsset.Id }, new AjaxOptions
{
    UpdateTargetId = "popup-page",
    LoadingElementId = "popup-loading",
    HttpMethod = "Post",
    OnSuccess = "CenterPopup"

})&nbsp;|&nbsp;<a onclick="CloseDialog()" href="#">@Resources_frank.Global_String_Close</a> 